// tree class for NBody code

#innclude "Body.h"
#include "macros.h"
#include "vec.h"
#include <iostream>
using namespace std;

class octant
{
	private:
		
		vector<double> dimensions(6), center(3);
		double mass_total, length;
		unsigned particle_total;
		Body * particle;
		octant * children[8];
		
	public:
		
		// Construct empty tree
		//
		octant();
		
		// Construct tree
		//
		octant( vec, double, double, double );
		
		// Destroy tree
		//
		~octant();
			
		// place particle using position
		//
		void add( Body * );
		
		// check position of particle
		//
		octant check_pos( Body * );
		
		// find particle using position
		//
		Body * find( int );
		
		// get force on particle
		//
		double force( Body * );
}